
import { axios } from '@/utils/request'

const api = {
  productEdit: '/plugins/product_traceability/product/product-edit',
  productList: '/plugins/product_traceability/product/product-list',
  productBatch: '/plugins/product_traceability/product/product-batch',
  productShow: '/plugins/product_traceability/product/product-show',
  delProduct: '/plugins/product_traceability/product/product-del',
}

export default api

export function productEdit (parameter) {
  return axios({
    url: api.productEdit,
    method: 'post',
    data: parameter
  })
}
export function getProductList (parameter) {
  return axios({
    url: api.productList,
    method: 'get',
    params: parameter
  })
}
export function productBatch(parameter) {
  return axios({
    url: api.productBatch,
    method: 'post',
    data: parameter
  })
}

export function productShow (parameter) {
  return axios({
    url: api.productShow,
    method: 'post',
    data: parameter
  })
}

export function delProduct (parameter) {
  return axios({
    url: api.delProduct,
    method: 'get',
    params: parameter
  })
}